package com.ifar.audiosdk.common

import com.ifar.audiosdk.utils.IfarPreference
import io.agora.rtc.video.VideoEncoderConfiguration

object IfarVideoConfig {
    var VIDEO_FPS = arrayOf(
        VideoEncoderConfiguration.FRAME_RATE.FRAME_RATE_FPS_15,
        VideoEncoderConfiguration.FRAME_RATE.FRAME_RATE_FPS_30
    )

    const val FPS_30 = 30
    const val FPS_15 = 15

    const val WIDTH_1920 = 1920
    const val WIDTH_1280 = 1280
    const val WIDTH_640 = 640

    const val HEIGHT_1080 = 1080
    const val HEIGHT_720 = 720
    const val HEIGHT_360 = 360

    var resolutionW: Int by IfarPreference("resolutionW", WIDTH_1280)
    var resolutionH: Int by IfarPreference("resolutionH", HEIGHT_720)
    var FPS: Int by IfarPreference("FPS", FPS_15)

    /**保存视频参数*/
    fun saveVideoParameter(w: Int, h: Int, fps: Int) {
        resolutionW = w
        resolutionH = h
        FPS = fps
    }
}